import { getUserInfo } from '@/config/storage'

const getDefaultState = () => {
  return {
    userInfo: getUserInfo()
  }
}

const state = getDefaultState()

const mutations = {
  SET_USERINFO: (state, userInfo) => {
    state.userInfo = userInfo
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
